﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using admin.two;

namespace admin
{
    public partial class work : UserControl
    {
        public work()
        {
            InitializeComponent();
            lb_fundation.SelectionChanged += lb_fundation_SelectionChanged;
        }

        void lb_fundation_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (lb_fundation.SelectedIndex == 0)
            {
                clearworks();
                ads a = new ads();
                works.Children.Add(a);
            }

            if (lb_fundation.SelectedIndex == 1)
            {
                clearworks();
                set set = new set();
                works.Children.Add(set);
            }

            if (lb_fundation.SelectedIndex == 2)
            {
                clearworks();
                updatepwd upwd = new updatepwd();
                works.Children.Add(upwd);
            }

            if (lb_fundation.SelectedIndex == 3)
            {
                clearworks();
                Insdata ins = new Insdata();
                works.Children.Add(ins);
            }

        }

        void clearworks()
        {
            works.Children.Clear();
        }

    }
}
